package com.eqdd.yiqidian.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

/**
 * Created by lvzhihao on 17-7-29.
 */

public class CommentTextView extends android.support.v7.widget.AppCompatTextView {

    public boolean linkHit;//内部链接是否被点击

    public CommentTextView(Context context) {
        super(context);
    }
    public CommentTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
    public CommentTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean performClick() {
        if(linkHit){
            return true;
        }
        return super.performClick();
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        linkHit = false;
        return super.onTouchEvent(event);
    }

}

